Integrand size = 41, antiderivative size = 122 \[ \int \frac {(a+i a \tan (e+f x))^3 (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^5} \, dx=\frac {4 a^3 (A-i B)}{5 c^5 f (i+\tan (e+f x))^5}+\frac {a^3 (i A+2 B)}{c^5 f (i+\tan (e+f x))^4}-\frac {a^3 (A-5 i B)}{3 c^5 f (i+\tan (e+f x))^3}-\frac {a^3 B}{2 c^5 f (i+\tan (e+f x))^2} \]
[Out]
Time = 0.21 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.049, Rules used = {3669, 78} \[ \int \frac {(a+i a \tan (e+f x))^3 (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^5} \, dx=-\frac {a^3 (A-5 i B)}{3 c^5 f (\tan (e+f x)+i)^3}+\frac {a^3 (2 B+i A)}{c^5 f (\tan (e+f x)+i)^4}+\frac {4 a^3 (A-i B)}{5 c^5 f (\tan (e+f x)+i)^5}-\frac {a^3 B}{2 c^5 f (\tan (e+f x)+i)^2} \]
[In]
[Out]
Rule 78
Rule 3669
Rubi steps \begin{align*} \text {integral}& = \frac {(a c) \text {Subst}\left (\int \frac {(a+i a x)^2 (A+B x)}{(c-i c x)^6} \, dx,x,\tan (e+f x)\right )}{f} \\ & = \frac {(a c) \text {Subst}\left (\int \left (-\frac {4 a^2 (A-i B)}{c^6 (i+x)^6}-\frac {4 i a^2 (A-2 i B)}{c^6 (i+x)^5}+\frac {a^2 (A-5 i B)}{c^6 (i+x)^4}+\frac {a^2 B}{c^6 (i+x)^3}\right ) \, dx,x,\tan (e+f x)\right )}{f} \\ & = \frac {4 a^3 (A-i B)}{5 c^5 f (i+\tan (e+f x))^5}+\frac {a^3 (i A+2 B)}{c^5 f (i+\tan (e+f x))^4}-\frac {a^3 (A-5 i B)}{3 c^5 f (i+\tan (e+f x))^3}-\frac {a^3 B}{2 c^5 f (i+\tan (e+f x))^2} \\ \end{align*}
Time = 5.64 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.64 \[ \int \frac {(a+i a \tan (e+f x))^3 (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^5} \, dx=\frac {a^3 \left (4 A+i B+5 (2 i A+B) \tan (e+f x)+(-10 A+5 i B) \tan ^2(e+f x)-15 B \tan ^3(e+f x)\right )}{30 c^5 f (i+\tan (e+f x))^5} \]
[In]
[Out]
Time = 0.31 (sec) , antiderivative size = 87, normalized size of antiderivative = 0.71
method | result | size |
derivativedivides | \(\frac {a^{3} \left (-\frac {4 i B -4 A}{5 \left (i+\tan \left (f x +e \right )\right )^{5}}-\frac {-4 i A -8 B}{4 \left (i+\tan \left (f x +e \right )\right )^{4}}-\frac {-5 i B +A}{3 \left (i+\tan \left (f x +e \right )\right )^{3}}-\frac {B}{2 \left (i+\tan \left (f x +e \right )\right )^{2}}\right )}{f \,c^{5}}\) | \(87\) |
default | \(\frac {a^{3} \left (-\frac {4 i B -4 A}{5 \left (i+\tan \left (f x +e \right )\right )^{5}}-\frac {-4 i A -8 B}{4 \left (i+\tan \left (f x +e \right )\right )^{4}}-\frac {-5 i B +A}{3 \left (i+\tan \left (f x +e \right )\right )^{3}}-\frac {B}{2 \left (i+\tan \left (f x +e \right )\right )^{2}}\right )}{f \,c^{5}}\) | \(87\) |
risch | \(-\frac {a^{3} {\mathrm e}^{10 i \left (f x +e \right )} B}{40 c^{5} f}-\frac {i a^{3} {\mathrm e}^{10 i \left (f x +e \right )} A}{40 c^{5} f}-\frac {i a^{3} A \,{\mathrm e}^{8 i \left (f x +e \right )}}{16 c^{5} f}+\frac {a^{3} {\mathrm e}^{6 i \left (f x +e \right )} B}{24 c^{5} f}-\frac {i a^{3} {\mathrm e}^{6 i \left (f x +e \right )} A}{24 c^{5} f}\) | \(110\) |
norman | \(\frac {\frac {a^{3} A \tan \left (f x +e \right )}{f c}+\frac {-4 i A \,a^{3}+B \,a^{3}}{30 c f}-\frac {\left (-8 i B \,a^{3}+19 a^{3} A \right ) \tan \left (f x +e \right )^{3}}{3 c f}+\frac {7 \left (-16 i B \,a^{3}+11 a^{3} A \right ) \tan \left (f x +e \right )^{5}}{15 c f}-\frac {\left (-8 i B \,a^{3}+a^{3} A \right ) \tan \left (f x +e \right )^{7}}{3 c f}+\frac {2 \left (i A \,a^{3}+3 B \,a^{3}\right ) \tan \left (f x +e \right )^{6}}{c f}+\frac {\left (10 i A \,a^{3}+2 B \,a^{3}\right ) \tan \left (f x +e \right )^{2}}{3 c f}-\frac {\left (22 i A \,a^{3}+17 B \,a^{3}\right ) \tan \left (f x +e \right )^{4}}{3 c f}-\frac {B \,a^{3} \tan \left (f x +e \right )^{8}}{2 c f}}{\left (1+\tan \left (f x +e \right )^{2}\right )^{5} c^{4}}\) | \(255\) |
[In]
[Out]
none
Time = 0.25 (sec) , antiderivative size = 64, normalized size of antiderivative = 0.52 \[ \int \frac {(a+i a \tan (e+f x))^3 (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^5} \, dx=-\frac {6 \, {\left (i \, A + B\right )} a^{3} e^{\left (10 i \, f x + 10 i \, e\right )} + 15 i \, A a^{3} e^{\left (8 i \, f x + 8 i \, e\right )} + 10 \, {\left (i \, A - B\right )} a^{3} e^{\left (6 i \, f x + 6 i \, e\right )}}{240 \, c^{5} f} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 218 vs. \(2 (100) = 200\).
Time = 0.46 (sec) , antiderivative size = 218, normalized size of antiderivative = 1.79 \[ \int \frac {(a+i a \tan (e+f x))^3 (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^5} \, dx=\begin {cases} \frac {- 960 i A a^{3} c^{10} f^{2} e^{8 i e} e^{8 i f x} + \left (- 640 i A a^{3} c^{10} f^{2} e^{6 i e} + 640 B a^{3} c^{10} f^{2} e^{6 i e}\right ) e^{6 i f x} + \left (- 384 i A a^{3} c^{10} f^{2} e^{10 i e} - 384 B a^{3} c^{10} f^{2} e^{10 i e}\right ) e^{10 i f x}}{15360 c^{15} f^{3}} & \text {for}\: c^{15} f^{3} \neq 0 \\\frac {x \left (A a^{3} e^{10 i e} + 2 A a^{3} e^{8 i e} + A a^{3} e^{6 i e} - i B a^{3} e^{10 i e} + i B a^{3} e^{6 i e}\right )}{4 c^{5}} & \text {otherwise} \end {cases} \]
[In]
[Out]
Exception generated. \[ \int \frac {(a+i a \tan (e+f x))^3 (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^5} \, dx=\text {Exception raised: RuntimeError} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 292 vs. \(2 (102) = 204\).
Time = 1.30 (sec) , antiderivative size = 292, normalized size of antiderivative = 2.39 \[ \int \frac {(a+i a \tan (e+f x))^3 (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^5} \, dx=-\frac {2 \, {\left (15 \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{9} + 30 i \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{8} - 15 \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{8} - 140 \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7} + 10 i \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7} - 170 i \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} + 65 \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} + 282 \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 12 i \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 170 i \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 65 \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 140 \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 10 i \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 30 i \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 15 \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 15 \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{15 \, c^{5} f {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + i\right )}^{10}} \]
[In]
[Out]
Time = 8.70 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.05 \[ \int \frac {(a+i a \tan (e+f x))^3 (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^5} \, dx=\frac {\frac {a^3\,\left (4\,A+B\,1{}\mathrm {i}\right )}{30}+\frac {a^3\,\mathrm {tan}\left (e+f\,x\right )\,\left (5\,B+A\,10{}\mathrm {i}\right )}{30}-\frac {B\,a^3\,{\mathrm {tan}\left (e+f\,x\right )}^3}{2}-\frac {a^3\,{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (10\,A-B\,5{}\mathrm {i}\right )}{30}}{c^5\,f\,\left ({\mathrm {tan}\left (e+f\,x\right )}^5+{\mathrm {tan}\left (e+f\,x\right )}^4\,5{}\mathrm {i}-10\,{\mathrm {tan}\left (e+f\,x\right )}^3-{\mathrm {tan}\left (e+f\,x\right )}^2\,10{}\mathrm {i}+5\,\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )} \]
[In]
[Out]